package com.link2room.ironhide.entity;

import com.link2room.common.entity.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by sss on 2016/12/29.
 */
@Entity
@Table(name = "l2r_group_roomtype")
public class L2RGroupRoomtype extends BaseEntity{
    private String groupRmtype;
    private String name;
    private String descript;
    private String descriptM;
    private Integer maxOccupancy;
    private String area;
    private String floor;
    private String bedType;
    private String bedSize;
    private String internet;
    private String windowType;
    private String viewType;
    private String searchCode;

    @Basic
    @Column(name = "group_rmtype", nullable = false, length = 16)
    public String getGroupRmtype() {
        return groupRmtype;
    }

    public void setGroupRmtype(String groupRmtype) {
        this.groupRmtype = groupRmtype;
    }

    @Basic
    @Column(name = "name", nullable = false, length = 64)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "descript", nullable = true, length = -1)
    public String getDescript() {
        return descript;
    }

    public void setDescript(String descript) {
        this.descript = descript;
    }

    @Basic
    @Column(name = "descript_m", nullable = true, length = -1)
    public String getDescriptM() {
        return descriptM;
    }

    public void setDescriptM(String descriptM) {
        this.descriptM = descriptM;
    }

    @Basic
    @Column(name = "max_occupancy", nullable = true)
    public Integer getMaxOccupancy() {
        return maxOccupancy;
    }

    public void setMaxOccupancy(Integer maxOccupancy) {
        this.maxOccupancy = maxOccupancy;
    }

    @Basic
    @Column(name = "area", nullable = true, length = 16)
    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    @Basic
    @Column(name = "floor", nullable = true, length = 16)
    public String getFloor() {
        return floor;
    }

    public void setFloor(String floor) {
        this.floor = floor;
    }

    @Basic
    @Column(name = "bed_type", nullable = true, length = 16)
    public String getBedType() {
        return bedType;
    }

    public void setBedType(String bedType) {
        this.bedType = bedType;
    }

    @Basic
    @Column(name = "bed_size", nullable = true, length = 16)
    public String getBedSize() {
        return bedSize;
    }

    public void setBedSize(String bedSize) {
        this.bedSize = bedSize;
    }

    @Basic
    @Column(name = "internet", nullable = true, length = 16)
    public String getInternet() {
        return internet;
    }

    public void setInternet(String internet) {
        this.internet = internet;
    }

    @Basic
    @Column(name = "window_type", nullable = true, length = 16)
    public String getWindowType() {
        return windowType;
    }

    public void setWindowType(String windowType) {
        this.windowType = windowType;
    }

    @Basic
    @Column(name = "view_type", nullable = true, length = 16)
    public String getViewType() {
        return viewType;
    }

    public void setViewType(String viewType) {
        this.viewType = viewType;
    }

    @Basic
    @Column(name = "search_code", nullable = true, length = 64)
    public String getSearchCode() {
        return searchCode;
    }

    public void setSearchCode(String searchCode) {
        this.searchCode = searchCode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        L2RGroupRoomtype that = (L2RGroupRoomtype) o;

        if (groupRmtype != null ? !groupRmtype.equals(that.groupRmtype) : that.groupRmtype != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (descript != null ? !descript.equals(that.descript) : that.descript != null) return false;
        if (descriptM != null ? !descriptM.equals(that.descriptM) : that.descriptM != null) return false;
        if (maxOccupancy != null ? !maxOccupancy.equals(that.maxOccupancy) : that.maxOccupancy != null) return false;
        if (area != null ? !area.equals(that.area) : that.area != null) return false;
        if (floor != null ? !floor.equals(that.floor) : that.floor != null) return false;
        if (bedType != null ? !bedType.equals(that.bedType) : that.bedType != null) return false;
        if (bedSize != null ? !bedSize.equals(that.bedSize) : that.bedSize != null) return false;
        if (internet != null ? !internet.equals(that.internet) : that.internet != null) return false;
        if (windowType != null ? !windowType.equals(that.windowType) : that.windowType != null) return false;
        if (viewType != null ? !viewType.equals(that.viewType) : that.viewType != null) return false;
        if (searchCode != null ? !searchCode.equals(that.searchCode) : that.searchCode != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = groupRmtype != null ? groupRmtype.hashCode() : 0;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (descript != null ? descript.hashCode() : 0);
        result = 31 * result + (descriptM != null ? descriptM.hashCode() : 0);
        result = 31 * result + (maxOccupancy != null ? maxOccupancy.hashCode() : 0);
        result = 31 * result + (area != null ? area.hashCode() : 0);
        result = 31 * result + (floor != null ? floor.hashCode() : 0);
        result = 31 * result + (bedType != null ? bedType.hashCode() : 0);
        result = 31 * result + (bedSize != null ? bedSize.hashCode() : 0);
        result = 31 * result + (internet != null ? internet.hashCode() : 0);
        result = 31 * result + (windowType != null ? windowType.hashCode() : 0);
        result = 31 * result + (viewType != null ? viewType.hashCode() : 0);
        result = 31 * result + (searchCode != null ? searchCode.hashCode() : 0);
        return result;
    }
}
